@use './minix.scss' as mix;

// 关闭按钮
.ep-close-btn {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

// 查询组件
.search-box {
    padding: 24px;
    background-color: #fff;
    border-radius: 8px;

    .search-content {
        display: flex;
        align-items: flex-start;
    }

    .search-left {
        @include mix.flex-align-center;

        flex-wrap: wrap;
        flex: 1;
        padding-right: 16px;
        margin-bottom: -24px;

        .search-label {
            flex-shrink: 0;
            padding: 0 16px;
        }
    }

    .search-item {
        @include mix.flex-align-center;

        flex-wrap: nowrap;
        margin-bottom: 24px;

        .search-component {
            flex: 1;
        }
    }

    .search-right {
        flex-shrink: 0;
    }
}

// 页面组件
.sg-page-box {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;

    .table-wrap {
        display: flex;
        padding: 24px;
        margin-top: 24px;
        min-height: 0;
        background-color: #fff;
        border-radius: 8px;
        flex-direction: column;
        flex: 1 1 auto;

        .table-box {
            flex: 1 1 auto;
            min-height: 0;
        }
    }
}

// 按钮列表
.sg-button-box {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

// 表单组件
.sg-form-popup-box {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 50%);
    transition: opacity 0.3s ease;

    .sg-form-popup-wrap {
        display: flex;
        padding: 24px;
        width: 480px;
        height: 480px;
        background-color: #fff;
        border-radius: 8px;
        transition: all 0.3s ease;
        flex-direction: column;

        .sg-form-popup-content {
            flex: 1 1 auto;
        }

        .sg-form-popup-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            line-height: 24px;

            .form-title {
                font-weight: 600;
                font-size: 18px;
            }
        }
    }
}

.form-item-box {
    .form-item-wrap {
        display: flex;
        align-items: center;
        margin-bottom: 24px;

        .form-item-label {
            position: relative;
            flex-shrink: 0;
            padding-right: 16px;
            padding-left: 8px;
            font-size: 14px;

            .star {
                position: absolute;
                left: 0;
                color: #e34d59;
            }
        }

        .form-item-component {
            position: relative;
            flex: 1;

            &.error-status {
                .error-label {
                    opacity: 1;
                }
            }
        }

        .error-label {
            position: absolute;
            top: 110%;
            left: 8px;
            font-size: 12px;
            color: #e34d59;
            opacity: 0;
            transition: opacity 0.3s;
            font-weight: 400;
        }
    }
}
